const customTitle = "微信号Soul95588";
const customArtist = "初见：人生得意须尽欢，莫使金樽空对月";
const customCover = `https://q4.qlogo.cn/headimg_dl?dst_uin=1900085000&spec=640&_ts=${Date.now()}`;

try {
    let obj = JSON.parse($response.body);

    if (typeof obj.data === "object" && obj.data !== null) {
        // 强制覆盖所有可能的封面字段
        obj.data.cover = customCover;  
        obj.data.picUrl = customCover; 

        if (obj.data.album && typeof obj.data.album === "object") {
            obj.data.album.picUrl = customCover;
        }

        // 修改其他信息
        obj.data.songname = customTitle;
        obj.data.name = customArtist;

        // 可选：开启调试日志
        const debug = false; 
        if (debug) {
            console.log(`封面已强制替换：${customCover}`);
            console.log(`完整响应：${JSON.stringify(obj, null, 2)}`);
        }
    }

    $done({ body: JSON.stringify(obj) });
} catch (error) {
    console.log("解析 JSON 失败:", error);
    $done({ body: $response.body }); // 解析失败时，返回原始数据，避免报错
}
